package com.llxy.worker.mapper;

import com.llxy.worker.domain.SupportWorker;
import com.llxy.worker.dto.SupportWorkerDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SupportWorkerMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(SupportWorker record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(SupportWorker record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    SupportWorker selectByPrimaryKey(Integer id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(SupportWorker record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(SupportWorker record);

    List<SupportWorker> selectSupportWorkerList(SupportWorker supportWorker);

    Integer selectSupportWorkerListCount(SupportWorker supportWorker);

    int updateRecommendStatus(@Param("id") Integer id, @Param("status") String status);

    int updateOutstandingStatus(@Param("id") Integer id, @Param("status") String status);
    int updateStatus(@Param("id") Integer id, @Param("status") Integer status);

    List<SupportWorker> selectStatusIsZoneList(@Param("userId") Long userId);

    SupportWorker selectByUserId(@Param("userId") Long userId);

    List<SupportWorker> selectAllStatusIsZoneList();

}